var express = require('express');
var router = express.Router();

//  var User = require('../model/user.model')

// /* GET users listing. */
// router.get('/', function(req, res, next) {
//   const user = new User({ name: 'Zhangsan2' });
//   user.save().then(() =>res.send('数据保存成功！'));
// });
var dataCtrl = require('../controllers/comm.controller');

router.post('/data',dataCtrl.create);
router.put('/data/:id',dataCtrl.update);
router.delete('/data/:id',dataCtrl.remove);
router.post('/list',dataCtrl.list);

module.exports = router;      
